package com.petRescueCenter.demo.posting.service;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;

import com.petRescueCenter.demo.common.web.VuejsPageRequest;
import com.petRescueCenter.demo.posting.entity.Posting;
import com.petRescueCenter.demo.posting.entity.dto.PostingDTO;
import com.petRescueCenter.demo.user.entity.User;

public interface IPostingService {
	public Posting save(Posting entity);

	public Posting findById(Long id);

	public boolean existsById(Long id);

	public long count();

	public void deleteById(Long id);

	public void deleteAll(Long[] ids);

	public Page<PostingDTO> findAll(Specification<Posting> spec, Pageable pageable);

	public Page<PostingDTO> findAll(Long fansId, Specification<Posting> spec, Pageable pageable);

	public Page<PostingDTO> findAll(Long fansId, List<PostingDTO> posting, Specification<Posting> spec,
			VuejsPageRequest pageRequest);

	public boolean existsByName(String name);

	public User findByName(String name);

	public List<PostingDTO> findAll();
}
